<link href="/js/boxy/css/boxy.css" media="screen" rel="stylesheet" type="text/css" >
<link href="/admins/css/yundan.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/admins/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/boxy/js/jquery.boxy.js"></script>
<link href="/js/boxy/css/boxy.css" media="screen" rel="stylesheet" type="text/css" >  
<script type="text/javascript">
      $(function() {
            window.alert = Boxy.alert;
            window.confirm = Boxy.confirm;
      });

<?php if ($this->retrack == 1) { ?>
            Boxy.alert('修改成功！');
            window.setTimeout("location.href = '/admini/todotask/index'", 2000);
<?php } ?>
</script>
<style>
      .button {
            display: inline-block;
            outline: none;
            cursor: pointer;
            text-align: center;
            text-decoration: none;
            font: 14px/100% Arial, Helvetica, sans-serif;
            padding: .5em 2em .55em;
            text-shadow: 0 1px 1px rgba(0,0,0,.3);
            -webkit-border-radius: .5em; 
            -moz-border-radius: .5em;
            border-radius: .5em;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
            box-shadow: 0 1px 2px rgba(0,0,0,.2);
            color: #fef4e9;
            border: solid 1px #da7c0c;
            background: #f78d1d;
            background: -webkit-gradient(linear, left top, left bottom, from(#faa51a), to(#f47a20));
            background: -moz-linear-gradient(top,  #faa51a,  #f47a20);
            filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#faa51a', endColorstr='#f47a20');
      }
      .button:hover {
            text-decoration: none;
            background: #f47c20;
            background: -webkit-gradient(linear, left top, left bottom, from(#f88e11), to(#f06015));
            background: -moz-linear-gradient(top,  #f88e11,  #f06015);
            filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f88e11', endColorstr='#f06015');
      }
      .button:active {
            position: relative;
            top: 1px;
            color: #fcd3a5;
            background: -webkit-gradient(linear, left top, left bottom, from(#f47a20), to(#faa51a));
            background: -moz-linear-gradient(top,  #f47a20,  #faa51a);
            filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#f47a20', endColorstr='#faa51a');
      }
</style>
<?php
$Item = $this->objresult;
if ($Item) {
      ?>
      <div id="editform">
            <form action="" method="post" id="ingform">     
                  <div class="rukutop">
                        <div class="rktopleft" style="width:1000px;">
                              <div class="rukushuru">
                                    <table>
                                          <tr>
                                                <td  colspan="2" align="center">待办事项详情</td>
                                          </tr>
                                    </table>
                              </div>
                              <div class="rukushuru" style="color:#c00;padding:8px 0;width: 400px;margin-left: 10px;" id="userRemark">
                              </div>
                        </div>
                        <div class="rktopright">
                              <div class="rukuxinfo"><p></p></div>
                              <div class="kuwei"></div>
                        </div>
                  </div>
                  <div class="rukunr">
                        <div style="width:800px;font-size:14px;padding: 20px;">
                              <div>
                                    <div class="rk1z">
                                          <table>
                                                <tr>
                                                      <td width="50%" >预计日期：</td>
                                                      <td>
                                                            <div class="time" style="padding:6px 5px;border:#ccc solid 1px;width: 200px">
                                                                  <!--点击后悬停样式为：<div class="timeselect t_on">-->
                                                                        <?php echo date("Y-m-d", strtotime($Item->expectTime)); ?>
                                                            </div>
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="rkz">事项类型：</td>
                                                      <td>
                                                            <input id="object-Type" type="hidden" value="<?= $Item->objectType ?>" />
                                                            <?php if($Item->objectType==1)echo '代购';
                                                                  if($Item->objectType==2)echo '退换货';
                                                                  if($Item->objectType==3)echo'自定义';?>
<!--                                                            <select class="input3 w200 required" id="objectType" name="objectType" >
                                                                  <option value="1">代购</option>
                                                                  <option value="2">退换货</option>
                                                                  <option value="3">自定义</option>
                                                            </select>-->
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="rkz">关联单号：</td>
                                                      <td><?php echo $Item->objectId?$Item->objectId:"未关联" ?></td>
                                                </tr>
                                                <tr>
                                                      <td class="rkz">优先级别：</td>
                                                      <td>
                                                            <?php if($Item->priority==1)echo '一般';
                                                                  if($Item->priority==2)echo '较低';
                                                                  if($Item->priority==3)echo'较高';
                                                                  if($Item->priority==4)echo'最高';?>
<!--                                                            <select id="priority" name="priority" class="input3 w200">
                                                                  <option value="1">一般</option>
                                                                  <option value="2">较低</option>
                                                                  <option value="3">较高</option>
                                                                  <option value="4">最高</option>
                                                            </select>-->
                                                      </td>
                                                </tr>    
                                                <tr>
                                                      <td class="rkz">名称：</td>
                                                      <td><?= $Item->title ?></td>
                                                </tr>
                                                <tr id="qdremark">
                                                      <td class="rkz">内容：</td>
                                                      <td><?= $Item->content ?>
                                                      </td>
                                                </tr>
                                                <tr >
                                                      <td class="rkz">状态：</td>
                                                      <td>
                                                            <?php if($Item->status==1)echo '未开始';
                                                                  if($Item->status==2)echo '进行中';
                                                                  if($Item->status==3)echo'已完成';?>
<!--                                                            <select id="objstatus" name="objstatus" class="input3 w200">
                                                                  <option value="1">未开始</option>
                                                                  <option value="2">进行中</option>
                                                                  <option value="3">已完成</option>
                                                            </select>-->
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="rkz"></td>
                                                      <td>
                                                            <input type="button" style="margin-left:30px;" class="button" value="返回" onclick="window.location.href='/admini/todotask/'" >
                                                      </td>
                                                </tr>
                                          </table>
                                    </div>
                              </div>
                        </div>
                        <hr style="margin-left:-20px;">
                  </div>
            </form>
      </div>
      <div id="tracktable">
            <?php
            $tracklist = $this->tracklist;
            if ($tracklist) {
                  echo'<div style="font-size:14px;padding: 20px;">历史记录：</div>';
                  ?>
                  <div style="width:1000px;margin-bottom: 10px;z-index: 1000;">
                        <table style="border: #b6c4d8 solid 1px; background: #ebeef7;width: 100%;border-collapse: collapse;border-spacing: 0;height: 30px;" >
                              <tr>
                                    <th class="li10" style="text-align:center">
                                          日期
                                    </th>
                                    <th class="li6" >
                                          操作人
                                    </th>
                                    <th class="li10">
                                          内容
                                    </th>
                                    <th class="li6" >
                                          执行状态
                                    </th>
                              </tr>
                        </table>
                  </div>
                  <?php
                  foreach ($tracklist as $key => $Track) {
                        ?>
                        <div style="width: 1000px;margin-bottom: 10px;">
                              <table style="width: 100%;border: #D4DAE2 solid 1px; background: #fff; height: 30px;">
                                    <tr>
                                          <td class="li10" align="center"><?= $Track->dateAdd ?></td>
                                          <td class="li6">
                                                <?= $Track->operator//$Item->UserName?$Item->UserName->nikename:''?>
                                          </td>
                                          <td class="li10"><?php echo $Track->content; ?></td>
                                          <td class="li6" ><?php echo Application_Model_TodoTask::getObjectIdStatus($Track->operateType); ?>
                                          </td>
                                    </tr>
                              </table>
                        </div>
                        <?php
                  }
            } else {
                  echo '<div class="tablebox"></div>';
            }
      }
      ?>
</div>
